import request from '@/utils/request'

/**
 * 仓库列表
 * @returns 
 */
export function listStore(goodsNo, sourceNo) {
  return request({
    url: '/stock/OutStock/stockList',
    method: 'get',
    params: {
      goodsNo,
      sourceNo
    }
  })
}

/**
 * 查询出库详情信息
 * @param {number} warehouseOutInfoId 
 * @param {number} goodsType 
 * @returns 
 */
export function list(warehouseOutInfoId, goodsType) {
  return request({
    url: '/stock/OutStock/list',
    method: 'get',
    params: {
      warehouseOutInfoId,
      goodsType
    }
  })
}

/**
 * 出库
 * @param {object} data 
 * @returns 
 */
export function updateStock(data) {
  return request({
    url: '/stock/OutStock/updateStock',
    method: 'post',
    data: data
  })
}

/**
 * 修改出库状态
 * @param {*} warehouseOutId 
 * @returns 
 */
export function updateWarehouseStatus(warehouseOutId, goodsType, sourceNo) {
  return request({
    url: '/stock/OutStock/updateWarehouseStatus',
    method: 'get',
    params: {
      warehouseOutId,
      goodsType,
      sourceNo
    }
  })
}